When a servomotor is controlled by a numerical control apparatus (CNC) using a computer, it is possible to switch between an arrangement in which the servomotor is used as a motor for positionally controlling a spindle and an arrangement in which the servomotor is used as a motor for controlling rotational velocity in the same manner as a spindle motor.
In FIG. 2, a workpiece rotating shaft is provided with a servomotor Ml and a spindle motor M2 controlled by being respectively connected to a servomotor control circuit B and a spindle control circuit C to which command signals from a control apparatus A are applied. With this method of control, however, a problem encountered is the high cost necessary for constructing the motors and their control circuits.
Accordingly, a system has been developed (FIG. 3) in which a single servomotor M0 is switchingly connected to a position control circuit D and a velocity control circuit E by a switch SW in response to a signal from the control apparatus A, thereby enabling positional control and velocity control to be realized.
FIG. 4 is a block diagram illustrating the changeover control performed by the conventional control apparatus A shown in FIG. 3. In FIG. 4, the data in a part program 1 of the CNC driven by a host computer or the like are extracted as position command signals by a decoding processor 2 and pulse distribution processor 3. The decoding processor 2 is connected to a programmable machine control (PMC) 5 via a data in/data out (DI/DO) control processor 4. A position command signal of the pulse distribution processor 3 is outputted to a servo-control processor 7 as a position command signal for each axis via an axis control processor 6. The servo-control processor 7 functions as a position control circuit with regard to a controlled-axis motor when a servomotor 9 is employed as both a spindle motor (X axis) and controlled axis (C axis) motor. In order for the position command signal to be converted into a velocity command signal for control of the controlled-axis motor, the signal is outputted to a velocity/current control circuit 8. It should be noted that N in the servomotor 9 indicates another axis.
Meanwhile, the signal that has been subjected to decoding processing enters the DI/DO control processor 4. In order to execute processing for an auxiliary function M, an S function for automatically reducing spindle rotating speed by a tape command and a T function for automatically selecting a tool, the DI/DO control processor 4 delivers a predetermined signal to the PMC 5. A spindle control and D/A conversion unit 10, which are provided in the PMC 5, and a changeover circuit 11 constitute a controller 12. In a case where the servomotor 9 has its rotational velocity controlled to serve as a spindle motor, the spindle control and D/A conversion unit 10 delivers a changeover command and velocity command voltage to the changeover circuit 11. The changeover circuit 11 responds by changing over the control mode to separate the position control circuit 7 from the velocity/current control circuit 8, and by outputting the velocity command voltage from the spindle control and D/A conversion unit 10 to the velocity/current control circuit 8. The spindle control and D/A conversion unit 10 outputs a feedback-ignore command to the servo-control processor 7 to enable open-loop control of the servomotor.
However, when rotational-velocity control and position control of a spindle are thus performed by a single servomotor, two control circuits, namely the circuit E for controlling rotational velocity and the circuit D for controlling position, are required. The result is a complicated arrangement. In addition, a command relating to control of position is not applied in the mode for commanding velocity. Therefore, when the mode is returned to that for commanding position, a reference point (origin) restoration operation is required in order to re-establish the coordinate system.